﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="email_wdyj_view.aspx.cs" Inherits="Ccit.OA.Email.email_wdyj_view" %>
<%@ Register src="../UserControls/AttachUpLoad.ascx" tagname="AttachUpLoad" tagprefix="uc1" %>
<%@ Register TagPrefix="ccit" Namespace="Ccit.ServerControls" Assembly="Ccit.ServerControls.ActionForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
   <script language="javascript" src="../script/jquery.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jbase64.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jsonlib.js" type="text/javascript" ></script>
    <script language="javascript" src="../script/jwindow.js"type="text/javascript" ></script>
    <script language="javascript" src="../script/StringClass_Ext.js" type="text/javascript" ></script>
    <script type="text/javascript">
    
    function doDel()
    {
         if(confirm("确定删除此邮件?"))
            {
                var id = $get("hidEmailId").value;
                var userId = $get("hidUserId").value;
                var jsonStr = jsonObj(id,userId);
                PageMethods.DeleteEmail(jsonStr,ClientCallBack);
                //return true;
            }
    }
    
     function ClientCallBack(vResult) {
            eval("var resultObj=" + vResult);
            var operType = resultObj.resultSign;
            var mParams = $get("hidVar").value;
            if(operType == "1")
            {
                alert('删除成功!');
                window.location.href = "email_wdyj_list.aspx?"+mParams;
            }
            else{
                alert('删除失败!');
            }
           
     }
    
     function jsonObj(id,userId) //返回序列化后的字符串
        {
            var MsRecord ={};
                MsRecord.Id = document.getElementById("hiJLBH").value;
                MsRecord.emailId = id;
                MsRecord.userId = userId;
                MsRecord.folderId = "";
                MsRecord.statelogo = document.getElementById("hidType").value;
                MsRecord.readlogo = "";
                MsRecord.agencId = "";
                MsRecord.deptId = "";
                MsRecord.jobId = "";
                MsRecord.levelId = "";
                MsRecord.cjuserId = "";
                MsRecord.cjdatetime = "";
                var jsonStr = JSON.stringify(MsRecord,function(key,value){return value;});  
                return jsonStr;
                
        }
        
        function doBack()
        {
            //var mParams = $get("hidVar").value;
            //window.location.href = "email_wdyj_list.aspx?"+mParams;
            history.go(-1);
        }
    
        //转发邮件
        function doTurn(mParams)
        {
            //window.location.href = "email_write.aspx?"+mParams;
            var url = "email_write.aspx?"+mParams;
            OpenWindow(url, "邮件转发", "1000", "600"); 
        }
        
        //回复
        function doAnswer(mParams)
        {
            //window.location.href = "email_write.aspx?"+mParams;
            var url= "email_write.aspx?" + mParams;
            OpenWindow(url, "邮件回复", "1000", "600"); 
        }
    </script>
</head>
	<body>
<ccit:ActionForm id="form1" runat="server">
     <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
			<input id="Val" type="hidden" value="0" name="Val" runat="server"> <input id="MailId" type="hidden" value="0" name="MailId" runat="server">
			<input id="ExportName" type="hidden" value="0" name="ExportName" runat="server">
			<input id="hiJLBH" type="hidden" runat="server" />
			<table class="tbToolbar" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0"
				id="TBToolbar">
				<tr>
					<td align="left">
						<div class="tbSeparator"></div>
					</td>
					<td class="titlebar" width="100%"><nobr><IMG src="../images/public/pageicon.gif" border="0">
							电子邮件 -&gt; 邮件信息 </nobr>
					</td>
					<td align="right">
						<div class="tbSeparator"></div>
					</td>
					<td>
					    <nobr>
					       <a href="javascript:doDel();" class="linktext">
                           <img src="../images/toolbar/DELETE.GIF" border="0" />删除</a>
					    </nobr>
					</td>
					<td id="HtmlReply" runat="server">
                        <nobr>
                        <asp:LinkButton runat="server" class="linktext" ID="lnbAnswer">
                        <IMG src="../images/toolbar/Reply.GIF" border="0">回复</asp:LinkButton>
                        </nobr>
   					</td>
					<td id="HtmlTurn" runat="server">
				        <nobr>
				        <asp:LinkButton runat="server" class="linktext" ID="lnbTurn">
				        <IMG src="../images/toolbar/turn.GIF" border="0">转发</asp:LinkButton></nobr>
					</td>
					<td id="HtmlBack" runat="server">
                        <nobr>
                        <a href="javascript:doBack();" class="linktext">
                        <IMG src="../images/toolbar/back.GIF" border="0">返回</a>
                        </nobr>
					</td>
					<td id="HtmlClose" runat="server">
                        <nobr>
                        <A class="LinkText" href="javascript:doClose();"><IMG src="../images/toolbar/back.GIF" border="0">关闭</A></div>
					</td>
					<td align="left">
						<div class="tbSeparatorEnd"></div>
					</td>
				</tr>
			</table>
			<table class="tableborder" cellSpacing="0" cellPadding="0" width="98%" align="center" id="TBTitle"
				height="92%">
				<tbody id="YJT" runat="server">
					<TR>
						<TD class="pformleft" style="FONT-SIZE: 9pt" align="right" width="80"><nobr><b>发件人</b></nobr></TD>
						<TD class="pformrightline" style="FONT-SIZE: 9pt" align="left" width="40%"><asp:label id="lbFJR" Runat="server" Width="98%"></asp:label><input type="hidden"  id="hidFJR" runat="server"/></TD>
						<TD class="pformleft" style="FONT-SIZE: 9pt" align="right" width="80"><nobr><b>发送时间</b></nobr></TD>
						<TD class="pformrightline" align="left" width="40%"><asp:label id="lbFSSJ" style="FONT-SIZE: 9pt" Runat="server" Width="98%"></asp:label></TD>
					</TR>
					<TR id="trNBSJR" runat="server">
						<TD class="pformleft" style="FONT-SIZE: 9pt" align="right" width="80"><nobr><b>内部收件人</b></nobr></TD>
						<TD class="pformrightline" align="left" colSpan="3"><asp:label id="lbNBSJR" style="FONT-SIZE: 9pt" Runat="server" Width="98%"></asp:label></TD>
					</TR>
					<TR id="trNBCSR" runat="server" style="display : none">
						<TD class="pformleft" style="FONT-SIZE: 9pt" align="right" width="80"><nobr><b>内部抄送人</b></nobr></TD>
						<TD class="pformrightline" align="left" colSpan="3"><asp:label id="lbNBCSR" style="FONT-SIZE: 9pt" Runat="server" Width="98%"></asp:label></TD>
					</TR>
					<TR id="trWBSJR" runat="server" style="display : none">
						<TD class="pformleft" style="FONT-SIZE: 9pt" align="right" width="80"><nobr><b>外部收件人</b></nobr></TD>
						<TD class="pformrightline" align="left" colSpan="3"><asp:label id="lbWBSJR" style="FONT-SIZE: 9pt" Runat="server" Width="98%"></asp:label></TD>
					</TR>
					<TR id="trWBCSR" runat="server" style="display : none">
						<TD class="pformleft" style="FONT-SIZE: 9pt" align="right" width="80"><nobr><b>外部抄送人</b></nobr></TD>
						<TD class="pformrightline" align="left" colSpan="3"><asp:label id="lbWBCSR" style="FONT-SIZE: 9pt" Runat="server" Width="98%"></asp:label></TD>
					</TR>
				</tbody>
				<TR>
					<TD class="pformleft" style="FONT-SIZE: 9pt" align="right" width="80"><nobr><b>主题</b></nobr></TD>
					<TD class="pformrightline" align="left" width="80%" colSpan="3"><asp:label id="lbZT" style="FONT-SIZE: 9pt" Runat="server" Width="98%"></asp:label></TD>
				</TR>
				<tr>
					<td width="10%" class="pformstrip" align="right" runat="server" >相关附件</td>
	            	<td class="pformstrip" id="FileList" align="left" width="90%" colSpan="3" runat="server">
	            	<uc1:AttachUpLoad  ID="AttUpLoad" ShowStyle="1" runat="server" />
	            	 </td>
				</tr>
				<TR>
					<TD class="richtextarea" vAlign="top" align="left" width="100%" height="100%" colSpan="4"
						id="ContextArea" runat="server">
						<asp:literal id="lbNR" runat="server" ></asp:literal>
		
					</TD>
				</TR>
			</table>
			<input type="hidden" id="hidEmailId" runat="server" />
			<input type="hidden" id="hidUserId" runat="server" />
			<input type="hidden" id="hidVar" runat="server" />
			<input type="hidden" id="hidType" runat="server" />
		</ccit:ActionForm>
	</body>
</html>
